package MessageComponent;

import java.io.Serializable;

import Snake.Cell;
import Snake.Power;

public class MessageThroughPipe implements Serializable {
	private static final long serialVersionUID = 12345678L;

	private EnumType type;
	private Cell cell;
	private Power power;
	private int ID;
	private boolean head;

	public MessageThroughPipe(EnumType type) {
		this.type = type;
	}
	
	public MessageThroughPipe(EnumType type, Power power) {
		this.type = type;
		this.power = power;
	}
	
	public MessageThroughPipe(EnumType type, int ID) {
		this.type = type;
		this.ID = ID;
	}
	
	public MessageThroughPipe(EnumType type, Cell cell) {
		this.type = type;
		this.cell = cell;
	}
	
	public MessageThroughPipe(EnumType type, Cell cell, boolean head) {
		this.type = type;
		this.cell = cell;
		this.head = head;
	}

	public EnumType getType() {
		return type;
	}
	
	public Cell getCell() {
		return cell;
	}
	
	public int getID() {
		return ID;
	}
	
	public boolean isHead() {
		return head;
	}
	
	public Power getPower() {
		return power;
	}
	
	@Override
	public String toString() {
		return "X: " + getType() + "; Y: " + getCell();
	}

}
